package com.hainiu.cat.web.controller;

import com.hainiu.cat.util.Result;
import com.hainiu.cat.web.event.UserBean;
import com.hainiu.cat.web.event.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * create by biji.zhao on 2021/6/25
 */
@RestController
public class UserController {

    @Resource
    UserService userService;

    @RequestMapping(value = "/register")
    public Result<String> register(UserBean user) {
        //调用注册业务逻辑
        userService.register(user);
        return Result.successInstance("注册成功");
    }
}
